<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class object_name</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../index.html" title="Chapter 1. Boost.Log v2">
<link rel="up" href="../../../utilities.html#header.boost.log.utility.ipc.object_name_hpp" title="Header &lt;boost/log/utility/ipc/object_name.hpp&gt;">
<link rel="prev" href="../save_result.html" title="Function template save_result">
<link rel="next" href="reliable_message_queue.html" title="Class reliable_message_queue">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../save_result.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../utilities.html#header.boost.log.utility.ipc.object_name_hpp"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reliable_message_queue.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.log.ipc.object_name"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class object_name</span></h2>
<p>boost::log::ipc::object_name — A system object name class. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../../utilities.html#header.boost.log.utility.ipc.object_name_hpp" title="Header &lt;boost/log/utility/ipc/object_name.hpp&gt;">boost/log/utility/ipc/object_name.hpp</a>&gt;

</span>
<span class="keyword">class</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>

  <span class="comment">// Name scopes. </span>
  <span class="keyword">enum</span> <a name="boost.log.ipc.object_name.scope"></a>scope <span class="special">{</span> global, user, session, process_group <span class="special">}</span><span class="special">;</span>
  <span class="comment">// <a class="link" href="object_name.html#boost.log.ipc.object_nameconstruct-copy-destruct">construct/copy/destruct</a></span>
  <a class="link" href="object_name.html#idm45961916344656-bb"><span class="identifier">object_name</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="object_name.html#idm45961916342480-bb"><span class="identifier">object_name</span></a><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="special">&amp;&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="object_name.html#idm45961916340528-bb"><span class="identifier">object_name</span></a><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="object_name.html#idm45961916338848-bb"><span class="identifier">object_name</span></a><span class="special">(</span><span class="identifier">scope</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="object_name.html#idm45961916335888-bb"><span class="identifier">object_name</span></a><span class="special">(</span><span class="identifier">scope</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="special">&amp;</span> <a class="link" href="object_name.html#idm45961916332944-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="special">&amp;&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="special">&amp;</span> <a class="link" href="object_name.html#idm45961916330416-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="object_name.html#idm45961916353024-bb">public member functions</a></span>
  <span class="keyword">bool</span> <a class="link" href="object_name.html#idm45961916352464-bb"><span class="identifier">empty</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="object_name.html#idm45961916350464-bb"><span class="identifier">size</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <a class="link" href="object_name.html#idm45961916348912-bb"><span class="identifier">c_str</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="object_name.html#idm45961916347360-bb"><span class="identifier">swap</span></a><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="object_name.html#idm45961916328160-bb">public static functions</a></span>
  <span class="keyword">static</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <a class="link" href="object_name.html#idm45961916327600-bb"><span class="identifier">from_native</span></a><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">static</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <a class="link" href="object_name.html#idm45961916324016-bb"><span class="identifier">from_native</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="object_name.html#idm45961916320720-bb">friend functions</a></span>
  <span class="keyword">friend</span> <span class="keyword">void</span> <a class="link" href="object_name.html#idm45961916320160-bb"><span class="identifier">swap</span></a><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">friend</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <a class="link" href="object_name.html#idm45961916316672-bb"><span class="identifier">to_string</span></a><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">friend</span> <span class="keyword">bool</span> <a class="link" href="object_name.html#idm45961916314400-bb"><span class="keyword">operator</span><span class="special">==</span></a><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">friend</span> <span class="keyword">bool</span> <a class="link" href="object_name.html#idm45961916310912-bb"><span class="keyword">operator</span><span class="special">!=</span></a><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">friend</span> <span class="keyword">bool</span> <a class="link" href="object_name.html#idm45961916307424-bb"><span class="keyword">operator</span><span class="special">&lt;</span></a><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">friend</span> <span class="keyword">bool</span> <a class="link" href="object_name.html#idm45961916303936-bb"><span class="keyword">operator</span><span class="special">&gt;</span></a><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">friend</span> <span class="keyword">bool</span> <a class="link" href="object_name.html#idm45961916300448-bb"><span class="keyword">operator</span><span class="special">&lt;=</span></a><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">friend</span> <span class="keyword">bool</span> <a class="link" href="object_name.html#idm45961916296960-bb"><span class="keyword">operator</span><span class="special">&gt;=</span></a><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> TraitsT<span class="special">&gt;</span> 
    <span class="keyword">friend</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">TraitsT</span> <span class="special">&gt;</span> <span class="special">&amp;</span> 
    <a class="link" href="object_name.html#idm45961916293456-bb"><span class="keyword">operator</span><span class="special">&lt;&lt;</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">TraitsT</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idm46846450205408"></a><h2>Description</h2>
<p>In order to identify a system-wide object such as a shared memory segment or a named synchronization primitive the object has to be given a name. The format of the name is specific to the operating system and the <code class="computeroutput"><a class="link" href="object_name.html" title="Class object_name">object_name</a></code> class provides an abstraction for names of objects. It also provides means for scoping, which allows to avoid name clashes between different processes.</p>
<p>The object name is a UTF-8 encoded string. The portable object name should consist of the following characters:</p>
<pre class="programlisting">
<span class="identifier">A</span> <span class="identifier">B</span> <span class="identifier">C</span> <span class="identifier">D</span> <span class="identifier">E</span> <span class="identifier">F</span> <span class="identifier">G</span> <span class="identifier">H</span> <span class="identifier">I</span> <span class="identifier">J</span> <span class="identifier">K</span> <span class="identifier">L</span> <span class="identifier">M</span> <span class="identifier">N</span> <span class="identifier">O</span> <span class="identifier">P</span> <span class="identifier">Q</span> <span class="identifier">R</span> <span class="identifier">S</span> <span class="identifier">T</span> <span class="identifier">U</span> <span class="identifier">V</span> <span class="identifier">W</span> <span class="identifier">X</span> <span class="identifier">Y</span> <span class="identifier">Z</span>
<span class="identifier">a</span> <span class="identifier">b</span> <span class="identifier">c</span> <span class="identifier">d</span> <span class="identifier">e</span> <span class="identifier">f</span> <span class="identifier">g</span> <span class="identifier">h</span> <span class="identifier">i</span> <span class="identifier">j</span> <span class="identifier">k</span> <span class="identifier">l</span> <span class="identifier">m</span> <span class="identifier">n</span> <span class="identifier">o</span> <span class="identifier">p</span> <span class="identifier">q</span> <span class="identifier">r</span> <span class="identifier">s</span> <span class="identifier">t</span> <span class="identifier">u</span> <span class="identifier">v</span> <span class="identifier">w</span> <span class="identifier">x</span> <span class="identifier">y</span> <span class="identifier">z</span>
<span class="number">0</span> <span class="number">1</span> <span class="number">2</span> <span class="number">3</span> <span class="number">4</span> <span class="number">5</span> <span class="number">6</span> <span class="number">7</span> <span class="number">8</span> <span class="number">9</span> <span class="special">.</span> <span class="identifier">_</span> <span class="special">-</span>
</pre>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>The character set corresponds to the POSIX Portable Filename Character Set (<a href="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_278" target="_top">http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_278</a>).</p></td></tr>
</table></div>
<p>
Use of other characters may result in non-portable system-specific behavior.</p>
<p>The name can have one of the following scopes:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p><code class="computeroutput">global</code> - objects within this scope are visible to any process on the system. In order to use this scope the process may need to have extended privileges. This scope is not available for Windows Store applications. </p></li>
<li class="listitem"><p><code class="computeroutput">user</code> - objects within this scope can be opened by processes running under the same user as the current process. </p></li>
<li class="listitem"><p><code class="computeroutput">session</code> - objects within this scope are visible to processes within the session of the current process. The definition of a session may vary between operating systems. On POSIX, a session is typically a group of processes attached to a single virtual terminal device. On Windows a session is started when a user logs into the system. There is also a separate session for Windows services. </p></li>
<li class="listitem"><p><code class="computeroutput">process_group</code> - objects within this scope are visible to processes within the process group of the current process. Currently, on Windows all processes running in the current session are considered members of the same process group. This may change in future.</p></li>
</ul></div>
<p>
The scopes are not overlapping. For instance, if an object is created in the global scope, the object cannot be opened with the same name but in user's scope.</p>
<p>Note that name scoping is not a security feature. On some systems any process on the system has technical capability to open objects within any scope. The scope is only used to help avoid name clashes between processes using <code class="computeroutput"><a class="link" href="object_name.html" title="Class object_name">object_name</a></code> to identify objects. </p>
<div class="refsect2">
<a name="idm46846450148384"></a><h3>
<a name="boost.log.ipc.object_nameconstruct-copy-destruct"></a><code class="computeroutput">object_name</code> 
        public
       construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="idm45961916344656-bb"></a><span class="identifier">object_name</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Default constructor. The method creates an empty object name.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput">empty() == true</code> </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm45961916342480-bb"></a><span class="identifier">object_name</span><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="special">&amp;&amp;</span> that<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Move constructor. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm45961916340528-bb"></a><span class="identifier">object_name</span><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span> that<span class="special">)</span><span class="special">;</span></pre>
<p>Copy constructor. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm45961916338848-bb"></a><span class="identifier">object_name</span><span class="special">(</span><span class="identifier">scope</span> ns<span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> str<span class="special">)</span><span class="special">;</span></pre>
<p>Constructor from the object name 
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">ns</code></span></p></td>
<td><p>The scope of the object name </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">str</code></span></p></td>
<td><p>The object name, must not be NULL. </p></td>
</tr>
</tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm45961916335888-bb"></a><span class="identifier">object_name</span><span class="special">(</span><span class="identifier">scope</span> ns<span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">const</span> <span class="special">&amp;</span> str<span class="special">)</span><span class="special">;</span></pre>
<p>Constructor from the object name 
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">ns</code></span></p></td>
<td><p>The scope of the object name </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">str</code></span></p></td>
<td><p>The object name </p></td>
</tr>
</tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="special">&amp;</span> <a name="idm45961916332944-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="special">&amp;&amp;</span> that<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Move assignment </p>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="special">&amp;</span> <a name="idm45961916330416-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span> that<span class="special">)</span><span class="special">;</span></pre>
<p>Copy assignment </p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="idm46846450086672"></a><h3>
<a name="idm45961916353024-bb"></a><code class="computeroutput">object_name</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="idm45961916352464-bb"></a><span class="identifier">empty</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Returns <code class="computeroutput">true</code> if the object name is empty </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="idm45961916350464-bb"></a><span class="identifier">size</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Returns length of the name, in bytes </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <a name="idm45961916348912-bb"></a><span class="identifier">c_str</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Returns the name string </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="idm45961916347360-bb"></a><span class="identifier">swap</span><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="special">&amp;</span> that<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Swaps the object name with another object name </p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="idm46846450056448"></a><h3>
<a name="idm45961916328160-bb"></a><code class="computeroutput">object_name</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <a name="idm45961916327600-bb"></a><span class="identifier">from_native</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> str<span class="special">)</span><span class="special">;</span></pre>
<p>Constructor from the native string.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">str</code></span></p></td>
<td><p>The object name string, must not be <code class="computeroutput">NULL</code>. The string format is specific to the operating system. </p></td>
</tr></tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <a name="idm45961916324016-bb"></a><span class="identifier">from_native</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">const</span> <span class="special">&amp;</span> str<span class="special">)</span><span class="special">;</span></pre>
<p>Constructor from the native string.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">str</code></span></p></td>
<td><p>The object name string. The string format is specific to the operating system. </p></td>
</tr></tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="idm46846450031024"></a><h3>
<a name="idm45961916320720-bb"></a><code class="computeroutput">object_name</code> friend functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">friend</span> <span class="keyword">void</span> <a name="idm45961916320160-bb"></a><span class="identifier">swap</span><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="special">&amp;</span> left<span class="special">,</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="special">&amp;</span> right<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Swaps two object names </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">friend</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <a name="idm45961916316672-bb"></a><span class="identifier">to_string</span><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span> name<span class="special">)</span><span class="special">;</span></pre>
<p>Returns string representation of the object name </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">friend</span> <span class="keyword">bool</span> <a name="idm45961916314400-bb"></a><span class="keyword">operator</span><span class="special">==</span><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span> left<span class="special">,</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span> right<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Equality operator </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">friend</span> <span class="keyword">bool</span> <a name="idm45961916310912-bb"></a><span class="keyword">operator</span><span class="special">!=</span><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span> left<span class="special">,</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span> right<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Inequality operator </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">friend</span> <span class="keyword">bool</span> <a name="idm45961916307424-bb"></a><span class="keyword">operator</span><span class="special">&lt;</span><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span> left<span class="special">,</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span> right<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Less operator </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">friend</span> <span class="keyword">bool</span> <a name="idm45961916303936-bb"></a><span class="keyword">operator</span><span class="special">&gt;</span><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span> left<span class="special">,</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span> right<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Greater operator </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">friend</span> <span class="keyword">bool</span> <a name="idm45961916300448-bb"></a><span class="keyword">operator</span><span class="special">&lt;=</span><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span> left<span class="special">,</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span> right<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Less or equal operator </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">friend</span> <span class="keyword">bool</span> <a name="idm45961916296960-bb"></a><span class="keyword">operator</span><span class="special">&gt;=</span><span class="special">(</span><a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span> left<span class="special">,</span> <a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span> right<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Greater or equal operator </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> TraitsT<span class="special">&gt;</span> 
  <span class="keyword">friend</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">TraitsT</span> <span class="special">&gt;</span> <span class="special">&amp;</span> 
  <a name="idm45961916293456-bb"></a><span class="keyword">operator</span><span class="special">&lt;&lt;</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">TraitsT</span> <span class="special">&gt;</span> <span class="special">&amp;</span> strm<span class="special">,</span> 
             <a class="link" href="object_name.html" title="Class object_name">object_name</a> <span class="keyword">const</span> <span class="special">&amp;</span> name<span class="special">)</span><span class="special">;</span></pre>
<p>Stream ouput operator </p>
</li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2007-2021 Andrey Semashev<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>).
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../save_result.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../utilities.html#header.boost.log.utility.ipc.object_name_hpp"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reliable_message_queue.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
